package TransactionImplementation

import (
	"SPC/AbstractTransactions"
	"SPC/Model"
)

type ChangeAddressTransaction struct {
	AbstractTransactions.ChangeEmployeeTransaction
	itsAddress string
}

func newChangeAddressTransaction(empid int, address string) *ChangeAddressTransaction{
	n := &ChangeAddressTransaction{
		*AbstractTransactions.NewChangeEmployeeTransaction(empid),
		address,
	}
	n.ChangeEmployeeTransaction.Change = n.Change
	return n
}

func (c * ChangeAddressTransaction)Change(e Model.Employee){
	e.SetAddress(c.itsAddress)
}